package com.zhisheng.orders.feign;

/*
    全哥
*/

import com.alibaba.fastjson.JSONObject;
import com.zhisheng.utils.MyThreadLocal;
import feign.RequestInterceptor;
import feign.RequestTemplate;
import org.springframework.stereotype.Component;

@Component
public class MyOpenFeignFilter implements RequestInterceptor {
    @Override
    public void apply(RequestTemplate requestTemplate) {
        requestTemplate.header("loginUser", JSONObject.toJSONString(MyThreadLocal.get()));
    }
}
